package yag.battle.pet.model;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by alex on 03.09.14.
 */
public class EquipmentMapper implements RowMapper<Equipment> {
    @Override
    public Equipment mapRow(ResultSet resultSet, int i) throws SQLException {
        Equipment eq = new Equipment(resultSet.getString("name"));
        eq.setId(resultSet.getInt("id"));
        return eq;
    }
}